import Vue from 'vue'
import VueRouter from 'vue-router'
import login from "@/views/user/login.vue";
import SupplierView from "@/views/view/SupplierView.vue";
import UsersView from "@/views/view/UsersView.vue";
import CustomersView from "@/views/view/CustomersView.vue";
import index from "@/views/view/index.vue";
import MyView from "@/views/user/MyView.vue";
import GoodsType from "@/views/merchandise/GoodsTypeViwe.vue";
import MerchandiseNews from "@/views/merchandise/MerchandiseNewsViwe.vue";
import layout from "@/views/view/layout.vue";
import CarriersView from "@/views/view/CarriersView.vue";
import BePutInStorage from "@/views/stash/BePutInStorage.vue";
import DeliveryFromStorage from "@/views/stash/DeliveryFromStorage.vue";
import salesOrders from "@/views/view/SalesOrdersView.vue";
import positionsView from "@/views/view/PositionsView.vue";
import departmentsView from "@/views/view/DepartmentsView.vue";
import PurchaseView from "@/views/view/PurchaseView.vue";
import RolesView from "@/views/view/RolesView.vue";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: login
    },
    {
        path: '/layout',
        component: layout,
        children:[
            {
                path: '/suppliers',
                component: SupplierView//供应商
            },
            {
                path: '/index',
                component: index
            },
            {
                path: '/MyView',
                component: MyView//个人中心
            },
            {
                path: "/goodsType",
                component:  GoodsType//商品类别
            },
            {
                path: "/merchandiseNews",
                component:  MerchandiseNews//商品信息
            },
            {
                path: '/carriers',
                component: CarriersView//承运商
            },
            {
                path: '/inbound',
                component: BePutInStorage
            },
            {
                path: '/orders',
                component: salesOrders//销售订单
            },
            {
                path: '/departments',
                component: departmentsView//部门
            },
            {
                path: '/positions',
                component: positionsView
            },
            {
                path: '/users',
                component: UsersView
            },
            {
                path: '/customers',
                component: CustomersView
            },
            {
                path: '/outvound',
                component: DeliveryFromStorage
            },
            {
                path: '/purchases',
                component: PurchaseView
            },
            {
                path: '/roles',
                component: RolesView
            }
        ],
    }
]

const router = new VueRouter({
    routes
})

export default router
